<?php/* * Created on May 21, 2009 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */class DBManager{	private static $instance;	private $mysqli;	/*	 * constructor	 */	private function __construct()	{		$dbProps = parse_ini_file('db_local.ini');		$this->mysqli = new mysqli($dbProps['mysql_host'], $dbProps['mysql_user'], $dbProps['mysql_password'], $dbProps['mysql_database']);		mysqli_select_db($this->mysqli, $dbProps['mysql_database']);		if (mysqli_connect_error())		{			die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());		}	}	/*	 * get the instance	 */	public static function getInstance()	{		if (!isset (self :: $instance))		{			self :: $instance = new DBManager();		}		return self :: $instance;	}	/*	 * get the handle	 */	public function getMysqlHandle()	{		return $this->mysqli;	}}?>
